package com.tensquare.search.dao;

import com.tensquare.search.pojo.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
import org.springframework.data.elasticsearch.repository.ElasticsearchCrudRepository;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * Created by WF on 2020/7/24 15:24
 */
public interface ArticleDao extends ElasticsearchRepository<Article,String> {

    //1.根据关键字进行分页查询
    Page<Article> findByTitleOrContentLike(String title,String content, Pageable pageable);
}
